Skip to content

Conversation

@zharinov
Copy link
Member

Summary

  • New optimization pass merges consecutive Up(n) instructions of the same mode
  • Up(1) → Up(1) → Up(2) becomes Up(4)
  • Reduces instruction count for deeply nested patterns like .).))).)).)

Why

Sequential Up(1) instructions are generated from nested named nodes. Collapsing them reduces bytecode size and improves execution speed.

@zharinov zharinov enabled auto-merge (squash) January 15, 2026 18:53
@zharinov zharinov changed the title opt: Collapse consecutive Up instructions of the same mode perf: Collapse consecutive Up instructions of the same mode Jan 15, 2026
@zharinov zharinov merged commit 74148c9 into master Jan 15, 2026
3 checks passed
@zharinov zharinov deleted the opt/collapse-up branch January 15, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants